package com.smart.service;

import java.util.Map;

import com.smart.domain.User;
import com.smart.dto.RegisterDto;
import com.smart.dto.UserDto;

/**
 * 
 * 版权所有：xxxxxxx
 * @Description: 用户
 * @Title: User.java 
 * @ClassName: User 
 * @author tangyan 
 * @date 2019年2月13日 下午4:31:26 
 * @version V1.0
 */
public interface UserService {
	
	
	/**
	 * 
	 * @Title: register 
	 * @Description: 注册
	 * @author tangyan 
	 * @param registerDto
	 * @throws Exception
	 */
	public void register(RegisterDto registerDto) throws Exception;
	
	
	/**
	 * 
	 * @Title: resestPassword 
	 * @Description: 重置密码
	 * @author tangyan 
	 * @param userId
	 * @param password
	 * @throws Exception
	 */
	public void resestPassword(String userId , String password  )throws Exception;
	
	/**
	 * 
	 * @Title: updatePassword 
	 * @Description: 修改密码
	 * @author tangyan 
	 * @param userId
	 * @param oldPassword
	 * @param password
	 * @throws Exception
	 */
	public void updatePassword(String userId , String oldPassword , String password)throws Exception;
	
	/**
	 * 
	 * @Title: updateUser 
	 * @Description: 修改用户扩展信息
	 * @author tangyan 
	 * @param userDto
	 * @return
	 * @throws Exception
	 */
	public UserDto updateUser(UserDto userDto)throws Exception;
	
	/**
	 * 
	 * @Title: getValidateCode 
	 * @Description: 获取验证码
	 * @author tangyan 
	 * @param phoneNumber
	 * @param email
	 * @param operate 1:注册，2：重置密码，3：修改密码
	 * @param type  类型  SMS 短信验证码 ，EMAIL 邮箱验证码
	 * @return
	 * @throws Exception
	 */
	public String getValidateCode( String phoneNumber, String email, String operate, String type)throws Exception;
	
	
	/**
	 * 
	 * @Title: findByUserId 
	 * @Description: 根据用户ID查询用户
	 * @author tangyan 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public User findByUserId(String id)throws Exception;
	
	/**
	 * 
	 * @Title: findbyCons 
	 * @Description: 多条件查询用户信息
	 * @author tangyan 
	 * @param conditions
	 * @return
	 * @throws Exception
	 */
	public User findbyCons(Map<String, Object> conditions)throws Exception;
	
	
}
